<?php


class TestController extends Controller
{
    public $Module = 'api';
    public $Controller = 'test';
    public $Action = 'index';
    public $UserConfig = array();

    public function __construct() {

    }

    public function TestAction()
    {
        $this->LoadResurces('push/class.umeng');
        $umeng = new Umeng();
        //ANDROID
        $result = $umeng->androidSend(array(
            'type' => 'customizedcast',
            'alias_type' => 'user',
            'alias' => 95,
            'display_type' => 'notification',
            'ticker' => '通知表示',
            'title' => '标题',
            'text' => '立刻问问'
        ));
        echo $result;
    }

    public function Test1Action()
    {
        $r = \yii2api\classes\yii2api\Loan::loanApply('ryx', 'B04-160111-011', '张三', '411327199003292913', '17091551612', 'test1', 'a:5:{s:10:"bankCardNo";s:19:"6228480402564890018";s:9:"payAmount";i:1000000;s:11:"downPayment";i:800000;s:10:"debtAmount";i:200000;s:8:"contract";s:4:"test";}');
        var_dump($r);
    }

    public function Test2Action()
    {
        $rand = StringCode::RandomCode(12);
        var_dump($rand);
    }
}